package com.ruoyi.roomDetail.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.roomDetail.mapper.OrderRoomDetailMapper;
import com.ruoyi.roomDetail.domain.OrderRoomDetail;
import com.ruoyi.roomDetail.service.IOrderRoomDetailService;

/**
 * 客房订单详情信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-05
 */
@Service
public class OrderRoomDetailServiceImpl implements IOrderRoomDetailService 
{
    @Autowired
    private OrderRoomDetailMapper orderRoomDetailMapper;

    /**
     * 查询客房订单详情信息
     * 
     * @param detailId 客房订单详情信息主键
     * @return 客房订单详情信息
     */
    @Override
    public OrderRoomDetail selectOrderRoomDetailByDetailId(Long detailId)
    {
        return orderRoomDetailMapper.selectOrderRoomDetailByDetailId(detailId);
    }

    /**
     * 查询客房订单详情信息列表
     * 
     * @param orderRoomDetail 客房订单详情信息
     * @return 客房订单详情信息
     */
    @Override
    public List<OrderRoomDetail> selectOrderRoomDetailList(OrderRoomDetail orderRoomDetail)
    {
        return orderRoomDetailMapper.selectOrderRoomDetailList(orderRoomDetail);
    }

    /**
     * 新增客房订单详情信息
     * 
     * @param orderRoomDetail 客房订单详情信息
     * @return 结果
     */
    @Override
    public int insertOrderRoomDetail(OrderRoomDetail orderRoomDetail)
    {
        orderRoomDetail.setCreateTime(DateUtils.getNowDate());
        return orderRoomDetailMapper.insertOrderRoomDetail(orderRoomDetail);
    }

    /**
     * 修改客房订单详情信息
     * 
     * @param orderRoomDetail 客房订单详情信息
     * @return 结果
     */
    @Override
    public int updateOrderRoomDetail(OrderRoomDetail orderRoomDetail)
    {
        orderRoomDetail.setUpdateTime(DateUtils.getNowDate());
        return orderRoomDetailMapper.updateOrderRoomDetail(orderRoomDetail);
    }

    /**
     * 批量删除客房订单详情信息
     * 
     * @param detailIds 需要删除的客房订单详情信息主键
     * @return 结果
     */
    @Override
    public int deleteOrderRoomDetailByDetailIds(Long[] detailIds)
    {
        return orderRoomDetailMapper.deleteOrderRoomDetailByDetailIds(detailIds);
    }

    /**
     * 删除客房订单详情信息信息
     * 
     * @param detailId 客房订单详情信息主键
     * @return 结果
     */
    @Override
    public int deleteOrderRoomDetailByDetailId(Long detailId)
    {
        return orderRoomDetailMapper.deleteOrderRoomDetailByDetailId(detailId);
    }
}
